package com.yztc.demo;

import com.yztc.demo.cglib.AccountDaoImpl;
import com.yztc.demo.cglib.CglibProxy;


/**
 * Created by Administrator on 2017/7/18.
 */
public class Main {
    public static void main(String[] args) {
        CglibProxy proxy = new CglibProxy();
        //通过生成子类的方式创建代理类
        AccountDaoImpl dao= (AccountDaoImpl)proxy.getProxy(AccountDaoImpl.class);
        dao.save("小明");
    }
}

